using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;

using Deepcode.Flux.Core.Data;
using Deepcode.Flux.Core.Services.Configuration;
using Deepcode.Flux.Core.Systems.Workflow;

namespace Deepcode.Flux.Core.Systems.CMS
{
	/// <summary>
	/// Class for quickly getting access to content information
	/// </summary>
	public class ContentManagerHelper
	{
		/// <summary>
		/// Gets the title of the node with the ID specified
		/// </summary>
		/// <param name="NodeID"></param>
		/// <returns></returns>
		public string GetNodeTitle(int NodeID)
		{
			if( NodeID == -1 ) return "Nothing Selected";
			ContentManager cms = new ContentManager();
			ContentObject o = cms.AdxGetByID( NodeID );
			if( o == null ) return "Invalid Selection";
			return o.NodeTitle;
		}

	}
}
